package com.eco.fanliapp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eco.fanliapp.dao.SyTimePeriodAppointmentMapper;
import com.eco.fanliapp.entity.SyTimePeriodAppointment;
import com.eco.fanliapp.service.ISyTimePeriodAppointmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 预约抢购表 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-09-23
 */
@Service
public class SyTimePeriodAppointmentServiceImpl extends ServiceImpl<SyTimePeriodAppointmentMapper, SyTimePeriodAppointment> implements ISyTimePeriodAppointmentService {
    @Autowired
    private SyTimePeriodAppointmentMapper syTimePeriodAppointmentMapper;

    /**
     * 根据userID和itemid查询预约商品
     * @param itemId
     * @param userId
     * @return
     */
    @Override
    public SyTimePeriodAppointment findAppointmentByItemIdAndUserId(Long itemId, Long userId) {
        return syTimePeriodAppointmentMapper.findAppointmentByItemIdAndUserId(itemId,userId);
    }
}
